<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // function sum(a,b){
        //     result = a+b;
        //     console.log('结果是：')
        //     return 'hello world';
        // }
        // //定义一个变量c来接受函数的返回值
        // var c = sum(21,22);
        // console.log(c)

        function mianji(r){
            return 3.14*r*r;
        }
        var r = mianji(prompt('请输入半径：'));
        alert(r)
    </script>
</head>
<body>
    
</body>
</html>